This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
public void helloWorld(){
Document document = new Document();
try {
PdfWriter.getInstance(document, new FileOutputStream("c:\\HelloWorld.pdf"));
document.open();
document.add(new Paragraph("Hello World"));
} catch (Exception e) {
}
document.close();
}
}
I'm getting the "Document has no pages" exception and when I debug there seems to be a problem with the code locating the Helvetica font, which is included in the jar.
Since this is a script library, I don't have access to the "Allowed Restricted Operations" setting that is available in an agent (that apparently solves the problem if you have a Java agent). Also, I don't want to deploy the jar file to every machine in the company, so I don't see a way that I can use the JavaUserClasses (unless you can specify a path to the jar file within the notes database).
Is there some way that I can get the script library or LS2J to locate and load the necessary fonts?
Thanks,
Michael Fariborz
Feedback number WEBB8FVR42 created by ~Wei Zekkrother on 04/13/2011
Status: Open
Comments: